package com.example.springboot.service;

import com.example.springboot.entity.DrugClassification;
import com.example.springboot.entity.Order;
import com.example.springboot.mapper.OrderMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {

    @Resource
    OrderMapper orderMapper;

    public PageInfo<Order> selectPage(Integer pageNum, Integer pageSize, Order order) {
        //开启分页查询
        PageHelper.startPage(pageNum, pageSize);
        List<Order> orderList = orderMapper.selectAll(order);
        return PageInfo.of(orderList);
    }
}
